<?php
	if(IsGV())
		include_once 'lophoc_danhsach.php';
	else
	{
?>
<div style="width:100%">
	<div class="Title" style="width:100%; color:#333; font-size:16px">Danh mục các lớp học</div>
	<div class="Table">
		<table width="50%" style="border-spacing:0; border:1px solid #DDD">
			<tr style="background-color: #DDD">
				<th style="" width="10%">STT</th>
				<th>Mã lớp</th>
			</tr>
			<?php
				
				include_once '../classes/lophoc_bs.php';
				include_once '../classes/hopdong_bs.php';
				include_once '../classes/giaovien_bs.php';
				$LopHoc = new lophoc_bs();
				$DLopHoc = $LopHoc->LayDanhSach();
				for($i = 0; $i < count($DLopHoc); $i++)
				{
					$MLH = $DLopHoc[$i]['MaLopHoc'];
					$PIN = $DLopHoc[$i]['PIN'];
					$link = "index.php?act=diemdanh&mlh=$MLH&pin=$PIN";
					echo '<tr>';
						echo '<td align="center"><b>' . ($i + 1) . '</b></td>';
						echo '<td><a href="' . $link . '">' . $DLopHoc[$i]['MaLopHoc'] . '</a></td>';
					echo '</tr>';
				}
			?>
		</table>
	</div>
</div>
<?php
	}
?>